<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>


    <!-- 引入bootstrap框架的样式文件 -->
    <link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.css" type="text/css">
    <link rel="stylesheet" href="../css/common/nav.css" type="text/css">
</head>

<body>

<div class="container-fluid">
    <div class="row">
        <%--<nav class="navbar navbar-default navbar-fixed-top" role="navigation">--%>
        <nav class="navbar navbar-default " role="navigation">
            <div class="container-fluid index">
                <!-- 左边 -->
                <div style="float:left">
                    <ul class="nav navbar-nav index11">
                        <li><a href="${path}/index.jsp"><img src="../imgs/logo.png" alt=""
                                             style="width:50px;margin-top:-20px;margin-left:100px;"></a></li>
                        <li><h2 style="margin-top:5px;">闲时</h2></li>
                        <!-- 一 -->
                        <li class="dropdown left">
                            <a href="" class="dropdown-toggle index13" data-toggle="dropdown">
                                我是需求方 <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu index12">
                                <li><a href="${path}/services/serviceListView">预约服务</a></li>
                                <li><a href="${path}/demand/demandRelease">发布需求</a></li>

                            </ul>
                        </li>

                        <!-- 二 -->
                        <li class="dropdown">
                            <a href="" class="dropdown-toggle index13" data-toggle="dropdown">
                                我是服务方 <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu index12">
                                <li><a href="${path}/demand/demandList">报名需求</a></li>
                                <li><a href="${path}/services/serviceReleaseView">发布服务</a></li>

                            </ul>
                        </li>
                        
                        <!-- 三 -->
                        <li class="dropdown">
                            <a href="" class="dropdown-toggle index13" data-toggle="dropdown">
                                我的订单 <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu index12">
                                <li><a href="${path}/service/release">发布服务的订单</a></li>
                                <li><a href="${path}/demand/reserved">预约服务的订单</a></li>

                                <hr>
                                <li><a href="${path}/demand/release">发布需求的订单</a></li>
                                <li><a href="${path}/service/enrolment">报名需求订单</a></li>

                            </ul>
                        </li>
                        <li>
                            <a href="${path}/index/aboutView" class="dropdown-toggle index13">
                                关于我们
                            </a>
                        </li>
                        <li>
                            <a href="${path}/index/tradeView" class="dropdown-toggle index13">
                                了解我们的交易
                            </a>
                        </li>
                    </ul>
                </div>
                <!-- 右边 -->
                <div style="float:right">
                    <ul class="nav navbar-nav index11">
                        <c:if test="${empty sessionScope.userId}">
                            <li class="dropdown">
                                <a href="${path}/client/loginView">登录</a>
                            </li>

                            <li class="dropdown">
                                <a href="${path}/client/registerView">注册</a>
                            </li>
                        </c:if>


                    </ul>
                </div>
            </div>
        </nav>
    </div>
</div>





<!-- bootstrap中的js插件依赖于jquery框架,所以必须先引入jquery的js文件 -->
<%--<script src="../plugins/jquery/jquery.min.js"></script>--%>
<%--<!--引入bootstrap的js文件-->--%>
<%--<script src="../plugins/bootstrap/js/bootstrap.js"></script>--%>

<script src="../js/common/nav.js"></script>
<script>
    $(document).ready(function () {
        dropdownOpen();//调用
    });
    /**
     * 鼠标划过就展开子菜单，免得需要点击才能展开
     */
    function dropdownOpen() {

        var $dropdownLi = $('li.dropdown');

        $dropdownLi.mouseover(function () {
            $(this).addClass('open');
        }).mouseout(function () {
            $(this).removeClass('open');
        });
    }
</script>
</body>

</html>